package com.hontech.bv.model.heat

import com.hontech.bv.conn.ReadFrame
import com.hontech.bv.conn.serial.Uint16
import com.hontech.bv.task.eventBus
import com.hontech.bv.utils.log

object HeatStatus {

    val status = Status()

    fun update(frame: ReadFrame) {
        frame.parse(arrayOf(
            status.appVersion,
            status.switchValue,
            status.adc,
            status.flowCount,
            status.ctrlValue,
            status.waterTemp,
            status.steamTemp,
            status.drawType,
            status.heatType
        ))
        eventBus.post(StatusUpdateEvent())
    }
}

